<template>
  <div class="newsDetail">
    <div class="head">
      <i class="iconfont icon-zuo" @click="$router.go(-1)"></i>
      <i class="iconfont icon-fenxiang"></i>
    </div>
    <div class="articleHead">
      <p>{{allContent.title}}</p>
      <div>
        <span>{{allContent.time}}</span>
        <div>
          <span>评论{{allContent.commentCount}}</span>
          <span>相关电影/影人</span>
        </div>
      </div>
    </div>
    <div v-html="content" class="content"></div>
  </div>
</template>

<script>
export default {
  components: {},
  props: {},
  data() {
    return {
      content: "",
      allContent: ""
    };
  },
  watch: {},
  computed: {},
  methods: {},
  created() {
    console.log(this.$route.params.id);
    this.$http("/api/newsDetails", {
      params: { id: this.$route.params.id }
    }).then(res => {
      console.log(res);
      this.content = res.data.data.content;
      this.allContent = res.data.data;
    });
  },
  mounted() {}
};
</script>
<style lang="scss" scoped>
@import "~@/assets/css/common.scss";
@import "~@/assets/css/style.css";
.newsDetail {
  .head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: vw(10) vw(20);
    background-color: #1c2635;
    i {
      color: #eee;
      font-size: vw(20);
    }
  }
  .articleHead {
    padding: 0 vw(20);
    margin-top: vw(16);
    p {
      font-size: vw(24);
      color: #333;
    }
    div {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: vw(10) 0;
      >span {
        color: #999;
        font-size: vw(14);
      }
      div {
        span {
          margin-right: vw(10);
          font-size: vw(14);
          color: #1e7dd7;
        }
      }
    }
  }
  .content {
    padding: vw(20);
  }
}
</style>